How to use best foreach and use paginate after query

welcome to shbcf.ru